package com.admission.model;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.admission.listener.AuditableEntity;
import com.annotation.AnElement;

//专题名称
@Entity
@Table(name = "special")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Special extends AuditableEntity {
	public static final String TOPTRUE = "1"; // 置顶
	public static final String TOPFALSE = "0"; // 不置顶
	public static final String HOMETRUE = "1"; // 首页
	public static final String HOMEFALSE = "0"; // 不在首页
	public static final String CONSULTTRUE = "1";// 开启
	public static final String CONSULTFALSE = "0";// 关闭
	@AnElement
	private String name;
	@AnElement
	private String hightop;
	@AnElement
	private String home;
	@AnElement
	private String photoUrl;
	@AnElement
	private List<SpecialArticle> specialArticles;
	@AnElement
	private String artName;// 对应文章列表名称
	@AnElement
	private String consult;// 开关

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getHightop() {
		return hightop;
	}

	public void setHightop(String hightop) {
		this.hightop = hightop;
	}

	public String getHome() {
		return home;
	}

	public void setHome(String home) {
		this.home = home;
	}

	public String getPhotoUrl() {
		return photoUrl;
	}

	public void setPhotoUrl(String photoUrl) {
		this.photoUrl = photoUrl;
	}

	@OneToMany(cascade = { CascadeType.ALL }, mappedBy = "special")
	public List<SpecialArticle> getSpecialArticles() {
		return specialArticles;
	}

	public void setSpecialArticles(List<SpecialArticle> specialArticles) {
		this.specialArticles = specialArticles;
	}

	public String getArtName() {
		return artName;
	}

	public void setArtName(String artName) {
		this.artName = artName;
	}

	public String getConsult() {
		return consult;
	}

	public void setConsult(String consult) {
		this.consult = consult;
	}

}
